#include<iostream>
#include<algorithm>
typedef long long ll;
using namespace std;
struct node{
    ll r;
    ll whe;
};
node arr[100005];
ll n;
bool cmp(node a,node b){
    if (a.r<b.r){
        return 1;
    }
    else if (a.r==b.r&&a.whe<b.whe){
        return 1;
    }
    else{
        return 0;
    }

}
ll had[100005],pos=1,last;

int main(){
    freopen("duel.in","r",stdin);
    freopen("duel.out","w",stdout);
    cin>>n;
    for (int i=1;i<=n;i++){
        cin>>arr[i].r;
        arr[i].whe=0;
    }
    sort(arr+1,arr+1+n,cmp);
    ll temp=n;
    ll flag=0;
    while (1){
        if (pos>n){
            if (flag==0)
                break;
            sort(arr+1,arr+1+n,cmp);
            n=temp;
            pos=1;
            flag=0;
        }
        if (pos==1){
            last=pos;
            pos++;
        }
        else{
            if (arr[last].r==arr[pos].r){
                pos++;
                continue;
            }
            else{
                if (arr[pos].whe==1){
                    pos++;
                    continue;
                }
                flag=1;
                arr[last].r=100005;
                arr[pos].whe=1;
                last=last+1;
                temp--;
                pos++;
            }
        }
    }
    cout<<temp;
    return 0;
}
